TEC-1960: adds unit tests for socket handlers#17
Open
swagnikdutta wants to merge 24 commits intomainfrom
Open
Conversation
c4e3920 to
b2ef239
Compare
997842f to
1d7d7b8
Compare
2c92790 to
8484722
Compare
8c37616 to
709a2ba
Compare
726eef0 to
10e7df2
Compare
swagnikdutta
commented
Mar 18, 2026
src/services/socket-handlers.ts
Outdated
| const filterParams = { documentId, sessionDid: socket.data.sessionDid }; | ||
| const [updates, total] = await Promise.all([ | ||
| mongodbStore.getUpdatesByDocument(filterParams, { committed: filters.committed }), | ||
| mongodbStore.getUpdatesByDocument(filterParams, { offset, limit, sort, committed: filters.committed }), |
Contributor
Author
There was a problem hiding this comment.
@nadeem-fileverse I had to add these option flags in the function call as existing tests were failing.
But I see you had removed these recently here. So I'm assuming there was a reason behind it.
- I would like to understand the reason. And what is the actionable now?
- Should we add the pagination back?
- Or should I update the unit test to satisfy the function call without pagination parameters?
Contributor
There was a problem hiding this comment.
Pagination is disabled atm you should adjust your test
Contributor
Author
There was a problem hiding this comment.
Cool. Can you share the reasoning behind removing pagination for now?
3f957fa to
cf75c4c
Compare
cf75c4c to
4e3df4c
Compare
Contributor
|
Test files use raw string literals ("NOT_AUTHENTICATED", "SESSION_NOT_FOUND", etc.) instead of the ErrorCode enum. |
Contributor
|
This looks good so far, but we should also test for session-manager and broadcast-bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.